import { defineStore } from 'pinia'
import { ref } from 'vue';


export const useCountStore = defineStore('count', () => {
  // 状态定义
  const articleCount = ref<number>(0); 
  const galleryCount = ref<number>(0);
  const diaryCount = ref<number>(0);

  return { articleCount, galleryCount, diaryCount };
},
 {
  persist: {
    storage: sessionStorage, // 这段代码是将Pinia状态存储在浏览器的会话存储(sessionStorage)中。
  }
})

